import Vue from 'vue'
import Router from 'vue-router'
import GuideMenu from "../components/user/parts/GuideMenu";
import Foot from "../components/user/parts/Foot";
import IndexLayout from "../components/user/index/IndexLayout";
import DetailsLayout from "../components/user/details/DetailsLayout";
import Details from "../components/user/details/Details";
import UserLogin from "../components/user/UserLogin";
import UserRegister from "../components/user/UserRegister";
import Home from "../components/Home";
import test1 from "../components/user/details/test1";
import ShowLayout from "../components/user/layout/ShowLayout";
import ManSkate from "../components/user/select/ManSkate";
import ManSport from "../components/user/select/ManSport";
import ManSlipper from "../components/user/select/ManSlipper";
import WomanSkate from "../components/user/select/WomanSkate";
import WomanSport from "../components/user/select/WomanSport";
import WomanHigh from "../components/user/select/WomanHigh";
import WomanSlipper from "../components/user/select/WomanSlipper";
import Head from "../components/user/parts/Head";
import ZhiFuBao from "../components/user/Pay/ZhiFuBao";
import Step1 from "../components/user/retrievePassword/Step1";
import CenterLayout from "../components/user/center/CenterLayout";
import Step2 from "../components/user/retrievePassword/Step2";
import Information from "../components/user/center/Information";
import Order from "../components/user/center/Order";
import Step3 from "../components/user/retrievePassword/Step3";
import AdminLogin from "../components/admin/AdminLogin";
import Layout from "../components/admin/AdminIndex/layout/Layout";
import UserInformation from "../components/admin/AdminIndex/user/UserInformation";
import CommodityInformation from "../components/admin/AdminIndex/commodity/CommodityInformation";
import CommodityEnter from "../components/admin/AdminIndex/commodity/CommodityEnter";
import ReadUserInformation from "../components/admin/AdminIndex/user/ReadUserInformation";
import Cart from "../components/user/cart/Cart";
import TransferInterface from "../components/user/TransferInterface";
import OrderInformation from "../components/admin/AdminIndex/order/OrderInformation";


Vue.use(Router);

export default new Router(
  {
    routes: [

      {
        path: '/',
        redirect: '/home'
      },
      {
        path: '/home',
        name: '首页',
        meta: {title: '首页'},
        component: Home
      },
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name:'首页',
      meta:{title:'首页'},
      component: Home
    },
      {
        path: '/',
        redirect: '/home'
      },
      {
        path: '/home',
        name: '首页',
        meta: {title: '首页'},
        component: Home
      },
      {
        path: '/GuideMenu',
        name: '导航栏',
        meta: {title: '导航栏'},
        component: GuideMenu
      },
      {
        path: '/UserLogin',
        name: '登录',
        meta: {title: '登录'},
        component: UserLogin
      },
      {
        path: '/UserRegister',
        name: '注册',
        meta: {title: '注册'},
        component: UserRegister
      },
      {
        path: '/Foot',
        name: '尾部',
        mata: {title: '尾部'},
        component: Foot
      },
      {
        path: '/IndexLayout',
        name: '商品展示主界面',
        mata: {title: '主界面'},
        component: IndexLayout
      },
      {
        path: '/zhiFuBao',
        name: '商品展示主界面',
        mata: {title: '主界面'},
        component: ZhiFuBao
      },
      {
        path: '/transferInterface',
        name: '商品展示主界面',
        mata: {title: '主界面'},
        component: TransferInterface
      },
      {
        path: '/ShowLayout',
        name: '男',
        meta: {title: '男鞋'},
        component: ShowLayout,
        children: [
          {
            path: '/manSkate',
            name: '男子板鞋',
            meta: {title: '男子板鞋'},
            component: ManSkate
          },
          {
            path: '/manSport',
            name: '男子运动鞋',
            meta: {title: '男子运动鞋'},
            component: ManSport
          },
          {
            path: '/manSlipper',
            name: '男子拖鞋',
            meta: {title: '男子拖鞋'},
            component: ManSlipper
          },
          {
            path: '/womanSkate',
            name: '女子板鞋',
            meta: {title: '女子板鞋'},
            component: WomanSkate
          },
          {
            path: '/womanSport',
            name: '女子运动鞋',
            meta: {title: '女子运动鞋'},
            component: WomanSport
          },
          {
            path: '/womanHigh',
            name: '女子高跟鞋',
            meta: {title: '女子高跟鞋'},
            component: WomanHigh
          },
          {
            path: '/womanSlipper',
            name: '女子拖鞋',
            meta: {title: '女子拖鞋'},
            component: WomanSlipper
          },
        ]
      },
      {
        path: '/DetailsLayout',
        name: 'DetailsLayout',
        mata: {title: '商品详情界面'},
        component: DetailsLayout
      },
      {
        path: '/Details',
        name: '商品详情中心',
        mata: {title: '商品详情中心'},
        component: Details,
        props: true
      },
      {
        path: '/test1',
        name: 'test1',
        mata: {title: '测试'},
        component: test1
      },
      {
        path: '/head',
        name: '头部',
        mata: {title: '头部'},
        component: Head
      },
      {
        path: '/centerLayout',
        name: '个人中心',
        component: CenterLayout,
        children: [
          {
            path: '/information',
            name: '个人信息',
            meta: {title: '个人信息'},
            component: Information
          },
          {
            path: '/order',
            name: '我的订单',
            meta: {title: '我的订单'},
            component: Order
          },
          {
            path: '/Cart',
            name: 'Cart',
            mata: {title: '购物车'},
            component:Cart
          }
        ]
      },
      {
        path: '/adminLogin',
        name: '商品展示主界面',
        mata: {title: '主界面'},
        component: AdminLogin
      },
      // {
      //   path: '/layout',
      //   name: '商品展示主界面',
      //   mata: {title: '主界面'},
      //   component: Layout
      // },
      {
        path: '/layout',
        name: '首页',
        meta: {title: '首页'},
        component: Layout,
        children: [
          {
            path: '/userInformation',
            name: '用户信息查看',
            meta: {title: '用户信息查看'},
            component: UserInformation
          },
          {
            path: '/readUserInformation',
            name: '用户信息录入',
            meta: {title: '用户信息录入'},
            component: ReadUserInformation
          },
          {
            path: '/commodityInformation',
            name: '商品信息查看',
            meta: {title: '商品信息查看'},
            component: CommodityInformation
          },
          {
            path: '/commodityEnter',
            name: '商品信息录入',
            meta: {title: '商品信息录入'},
            component: CommodityEnter
          },
          {
            path: '/orderInformation',
            name: '订单查询',
            meta: {title: '订单查询'},
            component: OrderInformation
          },
          {
            path: '/orderInformation',
            name: '订单查询',
            meta: {title: '订单查询'},
            component: OrderInformation
          }

        ]
      },
      {
        path: '/Step1',
        name: 'Step1',
        mata: {title: '找回密码'},
        component:Step1
      },
      {
        path: '/Step2',
        name: 'Step2',
        mata: {title: '找回密码'},
        component:Step2
      },
      {
        path: '/Step3',
        name: 'Step3',
        mata: {title: '找回密码'},
        component:Step3
      },


    ]
  })

